CC = gcc -g
ALL:pub tkclient
pub:
	mkdir build; \
        cd ../pub;\
        make -f Makefile;
	cp ../pub/libpub.a ./build;

CFILE =  tkevent.c \
	tknetbusi.c \
	tkhandler.c \
	tkclient.c

.SUFFIXES:.c
.c.o    :
	$(CC) $(CFLAGS) -c $< -I$(INCPATH) -I../pub

c_FILE_o = $(CFILE:.c=.o)

tkclient:$(c_FILE_o) build/libpub.a
	mv *.o ./build/;\
        cd ./build;     \
        gcc -o ../tkclient $(c_FILE_o)  \
                        -I. -I$(INCPATH) -I../pub \
                        -L. -L$(LIBPATH) -lpub -lfasterjson 
	@echo "<<<<<<<<<<<<<<<<< SUCCESS Build >>>>>>>>>>>>>>>>>>>>"

clean:
	rm -rf *.o tkclient
